<template>
  <div id="app">
    <h1 >{{ message }}</h1>
    <Student name="尚硅谷" address="北京" :age="10"/>
  </div>
</template>
<script>

import Student from "./components/Student.vue";

export default {
  name: "App",
  data() {
    return {
      message: "欢迎学习Vue",
    };
  },
  components: {
    Student,
  
    getH() {
      console.log(this.$refs.getHelement);//this.$refs.ref名字 获取h1元素
      
    },
    getStudentC() {
      console.log(this.$refs.getStudentComponent);//this.$refs.ref名字 获取组件实例
     

    },
  },
};
</script>
<style lang="less">
</style>
